#ifndef _IO_
#define _IO_

#include "SDL/include/SDL.h"							
#include "SDL/SDL_GfxPrimitives/SDL_gfxPrimitives.h"
#pragma comment (lib, "SDL/lib/SDL.lib")
#pragma comment (lib, "SDL/SDL_GfxPrimitives/SDL_GfxPrimitives_Static.lib")


enum color {BLACK, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, WHITE, COLOR_MAX}; // Colors

static Uint32 mColors [COLOR_MAX] = {0x000000ff,0xff0000ff, 0x00ff00ff, 0x0000ffff,0x00ffffff, 0xff00ffff, 0xffff00ff,0xffffffff};

class SDLAdapter
{
	public:

		SDLAdapter();
	
		SDL_Surface* getScreen();
		int getkey();
		int pollkey();
		int isKeyDown (int pKey);
		void drawImage(SDL_Surface *image, int xPos, int yPos, int w, int h);
		void DrawRectangle(int pX1, int pY1, int pX2, int pY2, enum color pC);  
		SDL_Surface* loadBitmap(char *file_name, int xPos, int yPos, int w, int h);
		void startGame(SDL_Surface *title);
		void drawSquare(int xPos, int yPos);
		void clearScreen();
		void refreshScreen();
		void initSDLGraphics();
		void shutdownGraphics();

};


#endif